/****************
Replication Code for 
   Zvobgo, Kelebogile, and Alan J. Simmons. “Do Americans Support War Crimes Prosecutions?”
   Foreign Policy Analysis.

Prepared for public posting in September 2024
*****************/	





ssc install blindschemes, replace all
set scheme plottig, permanently

clear all
set more off
capture log close
cap cd "/Users/kelebogilezvobgo/Library/CloudStorage/Dropbox/War Crimes Prosecutions/FPA_FINAL"
log using "Data/Analysis_zs2024warcrimesprosecutions.log", replace
use "Data/Data_zs2024warcrimesprosecutions.dta", clear
pause on





/*******************************
   Summary statistics	
*******************************/


***
* Table 2: Summary Statistics of Participant Characteristics
***
eststo clear
estpost summarize humanrightstreatment nationalinteresttreatment competingframestreatment information support_anycourt support_icc support_uscourts heard_icc heard_inv white woman liberal conservative atleastbachelors under40
esttab using "/Users/kelebogilezvobgo/Library/CloudStorage/Dropbox/War Crimes Prosecutions/FPA_FINAL/Tables/part_charac_main.tex", replace cells("mean(fmt(2)) min max count(fmt(0))") nonum noobs label



***
* Table A2: Summary Statistics of Additional Participant Characteristics
***
eststo clear
estpost summarize support_afgcourts democrat republican weeklynews trust_military io_accomplish io_biased 
esttab using "/Users/kelebogilezvobgo/Library/CloudStorage/Dropbox/War Crimes Prosecutions/FPA_FINAL/Tables/part_charac_addl.tex", replace cells("mean(fmt(2)) min max count(fmt(0))") nonum noobs label





/*******************************
    Figures	
*******************************/


***
* Figure 1: Treatment Effects with 95 percent Confidence Intervals, by Court
***

* Support for any court investigation 
ci means support_anycourt
ciplot support_anycourt, by(treatments) name (plot1, replace)
gr_edit .yaxis1.add_ticks .3 `""', tickset(major)
gr_edit .yaxis1.add_ticks .35 `""', tickset(major)
gr_edit .yaxis1.add_ticks .4 `""', tickset(major)
gr_edit .yaxis1.add_ticks .45 `""', tickset(major)
gr_edit .yaxis1.add_ticks .8 `""', tickset(major)
gr_edit .xaxis1.title.draw_view.setstyle, style(no)
gr_edit .note.draw_view.setstyle, style(no)

* Support for ICC investigation
ci means support_icc
ciplot support_icc, by(treatments) name (plot2, replace)
gr_edit .yaxis1.add_ticks .3 `""', tickset(major)
gr_edit .yaxis1.add_ticks .35 `""', tickset(major)
gr_edit .yaxis1.add_ticks .4 `""', tickset(major)
gr_edit .yaxis1.add_ticks .45 `""', tickset(major)
gr_edit .yaxis1.add_ticks .75 `""', tickset(major)
gr_edit .yaxis1.add_ticks .8 `""', tickset(major)
gr_edit .xaxis1.title.draw_view.setstyle, style(no)
gr_edit .note.draw_view.setstyle, style(no)

* Support for U.S. courts investigation
ci means support_uscourts
ciplot support_uscourts, by(treatments) name(plot3, replace)
gr_edit .yaxis1.add_ticks .3 `""', tickset(major)
gr_edit .yaxis1.add_ticks .35 `""', tickset(major)
gr_edit .yaxis1.add_ticks .4 `""', tickset(major)
gr_edit .yaxis1.add_ticks .45 `""', tickset(major)
gr_edit .yaxis1.add_ticks .5 `""', tickset(major)
gr_edit .xaxis1.title.draw_view.setstyle, style(no)
gr_edit .note.draw_view.setstyle, style(no)

*all graphs together*
graph combine plot1 plot2 plot3 
graph export "/Users/kelebogilezvobgo/Dropbox/Apps/Overleaf/War Crimes Prosecutions/diffinmeans.eps", replace
graph export "/Users/kelebogilezvobgo/Library/CloudStorage/Dropbox/War Crimes Prosecutions/FPA_FINAL/Figures/diffinmeans.eps", replace



***
* Figure 2: Venue Ranking: U.S. Courts, by Treatment Group
***

graph bar, over(rank_uscourts) by(treatment, col(2) note(""))/* col() enables subsequent commands, note() removes caption, 
*/ytitle("Support U.S. Courts Inv.")/* labels y-axis
*/ylabel(, nogrid labcolor(gs0))/* removes horiztonal gridlines, makes y-axis labs black
*/plotregion(fcolor(none) lcolor(gs0))/* makes plot region white
*/subtitle(,lcolor(gs0) fcolor(gs13))/* creates grey box around subplot headers
*/intensity(65)/* increases fill intensity */
gr_edit .plotregion1.grpaxis[2].style.editstyle majorstyle(tickstyle(textstyle(color(gs0))))/* makes x-axis labs black */
graph export "/Users/kelebogilezvobgo/Dropbox/Apps/Overleaf/War Crimes Prosecutions/rank_us.eps", replace
graph export "/Users/kelebogilezvobgo/Library/CloudStorage/Dropbox/War Crimes Prosecutions/FPA_FINAL/Figures/rank_us.eps", replace



***
* Figure A1: Venue Ranking: Afghan Courts, by Treatment Group
***

graph bar, over(rank_afgcourts) by(treatment, col(2) note(""))/* col() enables subsequent commands, note() removes caption, 
*/ytitle("Support Afghan Courts Inv.")/* labels y-axis
*/ylabel(, nogrid labcolor(gs0))/* removes horiztonal gridlines, makes y-axis labs black
*/plotregion(fcolor(none) lcolor(gs0))/* makes plot region white
*/subtitle(,lcolor(gs0) fcolor(gs13))/* creates grey box around subplot headers
*/intensity(65)/* increases fill intensity */
gr_edit .plotregion1.grpaxis[2].style.editstyle majorstyle(tickstyle(textstyle(color(gs0))))/* makes x-axis labs black */
graph export "/Users/kelebogilezvobgo/Dropbox/Apps/Overleaf/War Crimes Prosecutions/rank_afg.eps", replace
graph export "/Users/kelebogilezvobgo/Library/CloudStorage/Dropbox/War Crimes Prosecutions/FPA_FINAL/Figures/rank_afg.eps", replace





/*******************************
	Analysis	
*******************************/


***
* Setting global controls for regressions
***

global treat_groups humanrightstreatment nationalinteresttreatment competingframestreatment information
global demographics white woman liberal conservative atleastbachelors under40
global knowledge weeklynews heard_icc heard_inv
global io_attitudes io_accomplish io_biased
global interact_ideology liberal conservative hr_lib hr_con ni_lib ni_con comp_lib comp_con



***
* Regressions: Main Text
***

* Table 3: Framing Effects on Support for Accountability, by Court (Parsimonious Models)
eststo clear
eststo: reg support_anycourt $treat_groups
eststo: reg support_icc $treat_groups
eststo: reg support_uscourts $treat_groups
esttab using "/Users/kelebogilezvobgo/Library/CloudStorage/Dropbox/War Crimes Prosecutions/FPA_FINAL/Tables/parsimonious.tex", replace label b(3) se(2) nomtitles title("Framing Effects on Support for Accountability") star(* 0.05)


* Table 4: Framing Effects on Support for Accountability, by Court (with interactions for ideology)
eststo clear
eststo: reg support_anycourt $treat_groups liberal conservative
eststo: reg support_anycourt $treat_groups $interact_ideology
eststo: reg support_icc $treat_groups liberal conservative
eststo: reg support_icc $treat_groups $interact_ideology
eststo: reg support_uscourts $treat_groups liberal conservative
eststo: reg support_uscourts $treat_groups $interact_ideology
esttab using "/Users/kelebogilezvobgo/Library/CloudStorage/Dropbox/War Crimes Prosecutions/FPA_FINAL/Tables/interact_ideology.tex", replace label b(3) se(2) nomtitles title("Framing Effects on Support for Accountability") star(* 0.05)



***
* Regressions: Appendix 
***

* Table A3: Framing Effects on Support for Accountability, by Court (with party identification)

eststo clear
eststo: reg support_anycourt $treat_groups democrat republican
eststo: reg support_icc $treat_groups democrat republican
eststo: reg support_uscourts $treat_groups democrat republican
eststo: reg support_afgcourts $treat_groups democrat republican
esttab using "/Users/kelebogilezvobgo/Library/CloudStorage/Dropbox/War Crimes Prosecutions/FPA_FINAL/Tables/withparty.tex", replace label b(3) se(2) nomtitles title("Framing Effects on Support for Accountability") star(* 0.05)


* Table A4: Framing Effects on Support for Accountability, by Court (with demographics)

eststo clear
eststo: reg support_anycourt $treat_groups $demographics
eststo: reg support_icc $treat_groups $demographics 
eststo: reg support_uscourts $treat_groups $demographics
eststo: reg support_afgcourts $treat_groups $demographics
esttab using "/Users/kelebogilezvobgo/Library/CloudStorage/Dropbox/War Crimes Prosecutions/FPA_FINAL/Tables/withdemographics.tex", replace label b(3) se(2) nomtitles title("Framing Effects on Support for Accountability") star(* 0.05)


* Table A5: Framing Effects on Support for Accountability, by Court (controlling for knowledge of world affairs)

eststo clear
eststo: reg support_anycourt $treat_groups $knowledge
eststo: reg support_icc $treat_groups $knowledge 
eststo: reg support_uscourts $treat_groups $knowledge
eststo: reg support_afgcourts $treat_groups $knowledge
esttab using "/Users/kelebogilezvobgo/Library/CloudStorage/Dropbox/War Crimes Prosecutions/FPA_FINAL/Tables/withknowledge.tex", replace label b(3) se(2) nomtitles title("Framing Effects on Support for Accountability") star(* 0.05)


* Table A6: Framing Effects on Support for Accountability, by Court (controlling for trust in the U.S. military)

eststo clear
eststo: reg support_anycourt $treat_groups trust_military
eststo: reg support_icc $treat_groups trust_military
eststo: reg support_uscourts $treat_groups trust_military
eststo: reg support_afgcourts $treat_groups trust_military
esttab using "/Users/kelebogilezvobgo/Library/CloudStorage/Dropbox/War Crimes Prosecutions/FPA_FINAL/Tables/trust_mil.tex", replace label b(3) se(2) nomtitles title("Framing Effects on Support for Accountability") star(* 0.05)


* Table A7: Framing Effects on Support for Accountability, by Court (controlling for IO attitudes)

eststo clear
eststo: reg support_anycourt $treat_groups $io_attitudes
eststo: reg support_icc $treat_groups $io_attitudes
eststo: reg support_uscourts $treat_groups $io_attitudes
eststo: reg support_afgcourts $treat_groups $io_attitudes
esttab using "/Users/kelebogilezvobgo/Library/CloudStorage/Dropbox/War Crimes Prosecutions/FPA_FINAL/Tables/io_attitudes.tex", replace label b(3) se(2) nomtitles title("Framing Effects on Support for Accountability") star(* 0.05)


* Table A8: Framing Effects on Support for Accountability, by Court (Parsimonious Models, using Logit)

eststo clear
eststo: logit support_anycourt $treat_groups
eststo: logit support_icc $treat_groups
eststo: logit support_uscourts $treat_groups
eststo: logit support_afgcourts $treat_groups
esttab using "/Users/kelebogilezvobgo/Library/CloudStorage/Dropbox/War Crimes Prosecutions/FPA_FINAL/Tables/parsimonious_logit.tex", replace label b(3) se(2) nomtitles title("Framing Effects on Support for Accountability") star(* 0.05)


* Table A9: Framing Effects on Support for Accountability, by Court (Parsimonious Models, with Ordinal DVs, using Ologit)

eststo clear
eststo: ologit support_anycourt_5pt $treat_groups
eststo: ologit support_icc_5pt $treat_groups
eststo: ologit support_uscourts_5pt $treat_groups
eststo: ologit support_afgcourts_5pt $treat_groups
esttab using "/Users/kelebogilezvobgo/Library/CloudStorage/Dropbox/War Crimes Prosecutions/FPA_FINAL/Tables/parsimonious_ologit.tex", replace label b(3) se(2) nomtitles title("Framing Effects on Support for Accountability") star(* 0.05)  





clear all
exit
